
import http from '@/http/http.js'
import appConfig from '@/config/appConfig.js'


// 获取充值规则
export function $apiMembers (data = { method: 'mch.mbr.recharge.rule' }) {
  return http.req(undefined, data, "POST", { url: appConfig.memberBaseUrl + '/api/anon/member' })
}
// 获取会员信息
export function $getMemberInfo () {
  return http.req(undefined, {}, 'GET', { url: appConfig.memberBaseUrl + '/api/member' })
}
// 会员充值接口
export function $recharge (data) {
  return http.req(undefined, data, 'POST', { url: appConfig.memberBaseUrl + '/api/member/recharge' })
}
// 会员卡支付
export function $payRemberCard (amount, remark) {
  return http.req(undefined, { amount, remark }, "POST", { url: appConfig.memberBaseUrl + '/api/member/pay' })
}
// 查询会员充值记录
export function $getMemberRechargeRecord (params) {
  return http.req(undefined, params, 'GET', { url: appConfig.memberBaseUrl + '/api/member/rechargeRecord' })
}
// 查询会员消费记录
export function $getConsumeRecod (params) {
  return http.req(undefined, params, 'GET', { url: appConfig.memberBaseUrl + '/api/member/accountHistory' })
}